<template>
  <div class="app">
    <div class="box" @click="fn">1</div>
  </div>
</template>
<script>
export default{
  methods:{
    fn(){
      alert('你好')
    }
  }
}
</script>

<style lang='less'>
  .app{
    width: 200px;
    height: 200px;
    background-color: aqua;
    .box{
    width: 100px;
    height: 100px;
    background-color: aquamarine;
  }
  }
  
</style>